package Interview;

public class D6 implements Runnable{
	private int age;
	public D6(int age) {
		super();
		this.age = age;
	}
	@Override
	public void run() {
		for (int i = 0; i < 5; i++) {
			try {
				Thread.sleep(10);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
			System.out.println(this.age);
		}
	}
	public static void main(String[] args) {
		D6 d1 = new D6(0);
		D6 d2 = new D6(1);
		D6 d3 = new D6(2);
		D6 d4 = new D6(3);
		Thread t1 = new Thread(d1);
		Thread t2 = new Thread(d2);
		Thread t3 = new Thread(d3);
		Thread t4 = new Thread(d4);
		t1.start();
		t2.start();
		t3.start();
		t4.start();
	}
}
